import axios from '../request'

// 视频列表接口
export const videoList = ()=> axios.get('/v1/pub/video/list')

// 视频轮播图接口
export const videoBannerList = ()=> axios.get('/v1/pub/video/banner_list')

// 视频详情信息接口
export const videoDetail = (videoId)=> axios.get('/v1/pub/video/detail',{
    params:{
        video_id:videoId
    }
})

// 用户注册接口
export const userRegister = (name,pwd,phone)=> axios.post('/v1/pri/user/register',{
    name:name,
    pwd:pwd,
    phone:phone
})

// 用户登录接口
export const userLogin = (phone,pwd)=> axios.post('/v1/pri/user/login',{
    phone:phone,
    pwd:pwd
})

// 用户信息接口
export const userInfo = (token)=> axios.get('/v1/pri/user/info',{
    params:{
        token:token
    }
})

// 视频下单接口
export const orderSave = (token,videoId,state)=> axios.post('/v1/pri/order/save',{
    video_id:videoId,
    state:state
},{
    headers:{
        token:token
    }
})

// 已下单视频列表接口
export const orderList = (token)=> axios.get('/v1/pri/order/list',{
    params:{
        token:token
    }
}) 